import { request } from '@boeyo/portal';

/**
 * 查询预警等级配置列表
 * @ss.hasPermi('levelConfig:list')
 */
export const getLevelConfigList = (params) => {
  return request({
    url: '/levelConfig/list',
    method: 'GET',
    params,
  });
};

/**
 * 新增预警等级配置
 * @ss.hasPermi('levelConfig:add')
 */
export const addLevelCofig = (data) => {
  return request({
    url: '/levelConfig/add',
    method: 'POST',
    data,
  });
};

/**
 * 修改预警等级配置
 * @ss.hasPermi('levelConfig:update')
 */
export const updateLevelCofig = (data) => {
  return request({
    url: '/levelConfig/update',
    method: 'PUT',
    data,
  });
};

/**
 * 获取省份列表
 * null
 */
export const getProvinceList = (params) => {
  return request({
    url: '/chinaArea/getProvinceList',
    method: 'GET',
    params,
  });
};

/**
 * 删除预警等级配置
 * @ss.hasPermi('levelConfig:remove')
 */
export const remove = (data) => {
  return request({
    url: `/levelConfig/remove/${data}`,
    method: 'DELETE',
  });
};
